<template>
  <div>
    宽：
    <el-input-number v-model="numW"
                     @change="handleChangeW"
                     :min="0"
                     :max="2000"
                     label="描述文字"></el-input-number>
    <br>
    高：
    <el-input-number v-model="numH"
                     @change="handleChangeH"
                     :min="0"
                     :max="2000"
                     label="描述文字"></el-input-number>
    <br>
  </div>
</template>

<script>
import EventBus from '@/utils/eventBus'
export default {
  components: {},
  props: {
    current: Object,
  },
  data () {
    return {
    };
  },
  computed: {
    numW: {
      get() {
        return this.current.w;
      },
      set(val) {
        EventBus.$emit('changeSty',this.current.id,'w',val)
      },
    },
    numH: {
      get() {
        return this.current.h;
      },
      set(val) {
        EventBus.$emit('changeSty',this.current.id,'h',val)
      },
    },
  },
  watch: {},
  methods: {
    handleChangeW () {
      console.log('numW', this.numW);
    },
    handleChangeH () {
      console.log('numH', this.numH);
    }
  },
  created () {

  },
  mounted () {
  },
  beforeCreate () { },
  beforeMount () { },
  beforeUpdate () { },
  updated () { },
  beforeDestroy () { },
  destroyed () { },
  activated () { },
}
</script>
<style scoped>
</style>